<div id="uleft" class="uleft">
	<a class="home" href="/member/"><i></i><span>管理中心</span></a>
	{if($user.uc == 'sell')}
	<div {$left.i_sell.0}><i class="i_sell"></i><span>我是商家</span><i></i></div>
	<ul {$left.i_sell.1}>
		<a {:uleft('goods')} href="/member/goods/sale" lgu='goods/down|goods/stop|goods/audit||batch/points|batch/install|batch/updown'>商品管理</a>
		<a {:uleft('form/code|form/web|form/domain|form/serve')} href="javascript:released('sale');" lgu="form/code|form/web|form/domain|form/serve">发布出售</a>
		<a {:uleft('custom')} href="/member/custom/" lgu='custom/'>建立自助交易</a>
		<a {:uleft('order/sell')} href="/member/order/sell" lgu='order/sell'>我售出的订单</a>
		<a {:uleft('setup/shop|setup/service|setup/nav|setup/skill|setup/commend|setup/style|setup/slide')} href="/member/setup/shop" lgu='setup/service|setup/nav|setup/skill|setup/commend|setup/style|setup/slide'>店铺管理</a> 
		<a {:uleft('bond')} href="/member/bond/index" lgu="bond">商家保证金</a> 
	</ul>
	{/if}
	<div {$left.i_buy.0}><i class="i_buy"></i><span>我是买家</span><i></i></div>
	<ul {$left.i_buy.1}>
		<a {:uleft('cart')} href="/member/cart/" lgu="cart/|cashier/">购物车</a>
		<a {:uleft('form/demand|form/task')} href="javascript:released('buy');" lgu='form/demand_code|form/demand_web|form/demand_domain|form/task' >发布需求</a>
		<a {:uleft('demand/ing|demand/over|demand/audit')} href="/member/demand/ing" lgu='demand/over|demand/stop|demand/audit'>需求管理</a>
		<a {:uleft('order/buy')} href="/member/order/buy" lgu='order/buy'>我买入的订单</a>
	</ul>
	<div {$left.i_cw.0}><i class="i_cw"></i><span>财务管理</span><i></i></div>
	<ul {$left.i_cw.1}>
		<a {:uleft('onpay')} href="/member/onpay/" lgu='onpay/'>在线充值</a>
		<a {:uleft('cashed')} href="/member/form/cashed" lgu="lists/cashed">余额提现</a>
		<a {:uleft('money')} href="/member/lists/money">财务明细</a>
		<a {:uleft('jifen')} href="/member/lists/jifen">积分明细</a>
	</ul>
	<div {$left.i_user.0}><i class="i_user"></i><span>用户管理</span><i></i></div>
	<ul {$left.i_user.1} id="5">
		<a {:uleft('setup/info')} href="/member/setup/info">基本资料</a>
		<a {:uleft('central')} href="/member/central/" lgu="change/pass|change/safe|verify/email|verify/phone|certification/idcard|certification/company">安全认证</a>
		<a {:uleft('fav')} href="/member/lists/fav" lgu="fav_shop">我的收藏</a>
		<a {:uleft('message|login|bad|promotion')} href="/member/lists/message" lgu="lists/login|lists/bad|lists/promotion">消息记录</a>
	</ul>
	{if($user.uc == 'buy')}
	<div class="noclick" onclick="layer.confirm('您还不是商家，是否前去升级成为商家？',{icon: 0}, function(){location.href='/member/account/turn';});">
		<i class="i_sell"></i><span>成为商家</span><i></i>
	</div>
	{/if}
	</div>
<script>
$("#uleft div:not([class='noclick'])").on('click', function() {
	var hide=[1];
	$(this).attr('class') == 'cur'? $(this).removeClass('cur').next().hide() : $(this).addClass('cur').next().show();
	$("#uleft div:not([class='cur']) span").each(function(){
     hide.push($(this).html());
	 });
	$.cookie('user-left-hide',hide.join(','),{expires:365, path: '/', domain: '{:get_host()}'});
});
var role = readmeta('Or-Role'),
	ldu = role ? 'order/' + role : window.location.pathname.replace(/\d+/ig, '').split('/').splice(1, 2).join('/');
$("#uleft a").each(function() {
	var lmu = $(this).attr('href').substr(1),
		lgu = $(this).attr('lgu'),
		pd = new RegExp(ldu);
	if (lmu == ldu || pd.test(lgu)) {
		$('.home').removeClass('cur');
		$(this).addClass('cur').parent().show().parent().prev().addClass('cur');
		return false
	}
});
</script>